#pragma once
class binary_tree
{
	typedef int D;
	struct node
	{
		D data;
		node* left;
		node* right;
		node(node* l = NULL, node* r = NULL)
			:left(l)
			,right(r)
		{
		}
	};
	node* root_;
	size_t size_;
	bool insert(node* &nd, node* &new_node);
	void remove(node* &nd, const D& d);
	void print(node* nd);
	void destroy(node* nd);
public:
	binary_tree();
	~binary_tree();
	void insert(const D& d);
	void remove(const D& d);
	void print();
	const size_t size();
	size_t deep();
	void deep(node* &nd, size_t& dp);
};

